-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed handling of array values for AxiosHeaders; #5085
Conversation
@@ -222,13 +216,13 @@ Object.assign(AxiosHeaders.prototype, { | |||
return this; | |||
}, | |||
|
|||
toJSON: function() { | |||
toJSON: function(asStrings) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is toJSON used? Cannot see anywhere where it is used with asString === true
?
Are there cases where one wants arrays to be returned as string
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is toJSON used?
at least in test cases to make deep assertions, but...
asString === true
AxiosHeaders is a public class, so not 100% of its functionality should be used inside the Axios codebase, from the user's point of view, it should be a complete helper implementation for dealing with headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks 👍
Was upgrading axios and discovered this issue, came here to see if had any quickfix and already fixed and working perfect! Thank you so much! <3 |
Fixed handling of
set-cookie
headers as an array;Closes #5028, #5083;